package com.hzncc.flowable_diboot.contract.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.diboot.core.binding.query.BindQuery;
import com.diboot.core.binding.query.Comparison;
import com.diboot.core.entity.BaseModel;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

import jakarta.validation.constraints.NotNull;
import java.math.BigDecimal;

/**
* 合同产品信息 Entity 定义
* @author MyName
* @version 1.0
* @date 2024-07-12
* Copyright © MyCorp
*/

@TableName("mdl_contract_product")
@Getter @Setter @Accessors(chain = true)
public class ContractProduct extends BaseModel {
    private static final long serialVersionUID = 1228724387622356797L;

    /**
     * 租户
     */
    @NotNull(message = "租户不能为空")
    @TableField()
    private String tenantId;

    /**
     * 合同审批ID
     */
    @NotNull(message = "合同审批ID不能为空")
    @TableField()
    private String contractAuditId;

    /**
     * 合同编码
     */
    @NotNull(message = "合同编码不能为空")
    @Length(max=100, message="合同编码长度应小于100")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String contractCode;

    /**
     * 合同版本
     */
    @NotNull(message = "合同版本不能为空")
    @Length(max=100, message="合同版本长度应小于100")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private Long contractVersion;

    /**
     * 产品编码
     */
    @NotNull(message = "产品编码不能为空")
    @Length(max=100, message="产品编码长度应小于100")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String productCode;

    /**
     * 规格型号
     */
    @NotNull(message = "规格型号不能为空")
    @Length(max=100, message="规格型号长度应小于100")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String productType;

    /**
     * 配套机床型号
     */
    @NotNull(message = "配套机床型号不能为空")
    @Length(max=100, message="配套机床型号长度应小于100")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String machineType;

    /**
     * 机床轴数
     */
    @NotNull(message = "机床轴数不能为空")
    @Length(max=100, message="机床轴数长度应小于100")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String machineAxisNum;

    /**
     * 通道数
     */
    @NotNull(message = "通道数不能为空")
    @Length(max=100, message="通道数长度应小于100")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String channelNum;

    /**
     * 产品单价
     */
    @Length(max=100, message="产品单价长度应小于100")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private BigDecimal productPrice;

    /**
     * 订购产品数量
     */
    @Length(max=100, message="订购产品数量长度应小于100")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private Long productCount;

    /**
     * 合同折扣
     */
    @Length(max=100, message="合同折扣长度应小于100")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private BigDecimal productDiscount;

    /**
     * 合同总金额
     */
    @Length(max=100, message="合同总金额长度应小于100")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private BigDecimal contractPrice;

    /**
     * SAP合同号
     */
    @Length(max=100, message="SAP合同号长度应小于100")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String sapContractCode;

    /**
     * SAP合同ID
     */
    @TableField
    private String sapContractId;

    /**
     * SAP合同是否取消
     */
    @TableField()
    private String sapContractCancel;

    /**
     * 备注
     */
    @Length(max=100, message="备注长度应小于100")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String remark;

    /**
     * 清单页号
     */
    @TableField()
    private String sheetNum;

    /**
     * 销售组织
     */
    @Length(max=100, message="销售组织长度应小于100")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String salesOrg;

    /**
     * sap合同推送状态 1 未推送 2 部分物料推送 3 全部物料已推送
     */
    @TableField
    private String sapContractPushStatus;

    /**
     * 技术清单文件
     */
    private String techFile;

    /**
     * 技术清单最大序号
     */
    @TableField()
    private Integer lastNum;
}